The present invention relates to the art of industrial controllers, and more particularly to a method and system for selecting controller output value source.
Industrial controllers are special purpose computers used for controlling industrial processes, manufacturing equipment, and other factory automation. In accordance with a control program, the industrial controller measures one or more process variables or inputs reflecting the status of a controlled process, and changes outputs effecting control of the process. The inputs and outputs may be binary, (e.g., on or off), as well as analog inputs and outputs assuming a continuous range of values. The control program may be executed in a series of execution cycles with batch processing capabilities.
The measured inputs received from a controlled process and the outputs transmitted to the process generally pass through one or more input/output (I/O) modules. These I/O modules serve as an electrical interface between the controller and the controlled process, and may be located proximate or remote from the controller. The inputs and outputs are recorded in an I/O table in processor memory. Input values may be asynchronously read from the controlled process by one or more input modules and output values are written directly to the I/O table by the processor for subsequent communication to the process by specialized communications circuitry. An output module may interface directly with a controlled process, by providing an output from an table to an actuator such as a valve, solenoid, and the like.
During execution of the control program, values of the inputs and outputs exchanged with the controlled process pass through the I/O table. The values of inputs in the I/O table are asynchronously updated from the controlled process by dedicated scanning circuitry. This scanning circuitry may communicate with input modules over a bus on a backplane or network communications. The scanning circuitry also asynchronously writes values of the outputs in the I/O table to the controlled process. The output values from the I/O table are then communicated to one or more output modules for interfacing the process. Thus, the processor may simply access the I/O table rather than needing to communicate directly with the controlled process.
An industrial controller may be customized to the particular process by writing control software that may be stored in the controller""s memory and/or by changing the hardware configuration of the controller to match the control task. Controller hardware configuration is facilitated by separating the industrial controller into a number of control modules, each of which is performing a different function. Particular control modules needed for the control task may then be connected together on a common backplane within a rack. The control modules may include processors, power supplies, network communication modules, and I/O modules exchanging input and output signals directly with the controlled process. Data may be exchanged between modules using a backplane communications bus, which may be serial or parallel. A typical hardware modification may involve adding additional I/O modules so as to be able to control additional equipment.
Various control modules of the industrial controller may be spatially distributed along a common communication link in several racks. Certain I/O modules may thus be located in close proximity to a portion of the control equipment, and away from the remainder of the controller. Data is communicated with these remote modules over a common communication link, or network, wherein all modules on the network communicate using a standard communications protocol.
In a typical distributed control system, one or more output modules are provided for interfacing with a process. The outputs derive their control or output values in the form of a message from a master or peer device over a network or a backplane. For example, an output module may receive an output value from a processor, such as a programmable logic controller (PLC), via a communications network or a backplane communications bus. The desired output value is generally sent to the output module in a message, such as an explicit message or an I/O message. The output module receiving such a message will provide a corresponding output (analog or digital) to the controlled process.
Many current output modules or devices provide outputs solely based on such messages, having no internal logic. For example, the module provides an output according to an output value received in an I/O message from a master (e.g., a PLC), and will maintain that value during normal operation until another message is received. In some modules, certain conditions can affect the output value. For instance, when a module detects a communications fault, the output may go to a known state. However, there are many sources that can affect an output point""s value. These include an I/O message, an explicit message, local logic, fault or idle values, and/or a forcing message. Heretofore, the source of an output value was determined according to fixed controller architecture constraints. Thus, a user had limited ability to decide priorities for the source of an output module""s output value.
In accordance with the present invention, there is provided a method for selecting an output value for an output device or module in a controller or control system, which allows a user to define which value source will provide the output value. The user may define one or more attributes associated with an output, which are used by the module to select its value source. More than one source may provide an output value, one of which may be selected by a module based on configuration of the module, the current state of the module, and the state of the network.
According to one aspect of the present invention, the method comprises associating an output device with a logic function, and providing the output value according to the logic function. The logic function may be local logic, provided by a PLC or other processor communicating with the output device, or may be integral with the output device. The method further comprises ignoring explicit messages from the network, ignoring I/O value messages from the network, selectively ignoring fault messages according to an override attribute, and selectively ignoring idle messages according to an override attribute. In this regard, a control system user may configure an output module by defining various attributes (e.g., override attributes) to thereby define the output value source selection semantics. The source of an output device""s output value is then determined based on the user-defined attributes as well as system conditions (e.g., the current state of the module, and the state of the network). By providing a user with the ability to define and control the output value source selection, the invention allows a user to ensure safe operation of a process under a variety of circumstances.
Another aspect of the present invention provides for creating a binding between the output device and local logic. The local logic may be a function block, a hardware input, a fault, and/or an output. An output can thus be bound to any system value that a developer thinks may be useful in local logic.
According to another aspect of the present invention, the method may further comprise selectively using an idle action and setting the output value according to an idle value when the local logic function is disabled. In addition, where a fault is detected, the method may provide for selectively using a fault action and setting the output value according to a fault value. In this regard, the user may define one or more override attributes in configuring the output device, which are then used to determine whether the fault action and fault value are to be used when a fault event occurs.
According to another aspect of the invention, the method may provide for sending an object state conflict error to the network in response to an explicit message from the network. In this way, the binding of an output to local logic will take precedence over explicit messages received from a network, and the output module may inform the source of an explicit message that there is an object state conflict because it is bound to the local logic.
According to still another aspect of the invention, idle messages may be selectively ignored, depending on a user-defined override attribute. Thus, a user may define whether idle messages received from a network will be ignored or whether the output will use an idle action and set the output value according to an idle value.
In accordance with another aspect of the invention, a system is provided for selecting an output value for an output device in communication with a network. The system comprises means for associating the output device with a logic function, means for providing the output value according to the logic function, means for ignoring explicit messages from the network, means for ignoring value messages from the network, means for selectively ignoring fault messages according to an override attribute, and means for selectively ignoring idle messages according to the override attribute. The system provides for user-defined control over the state of an output according to the configuration of an output device or module, the current state of the device, as well as the state of the network.
According to another aspect of the invention, there is provided an output module, comprising a value source selector adapted to receive messages from a network, a local logic function associated with the value source selector to create a binding, which provides a signal to the value source selector, and an output receiving an output value from the value source selector based on the signal from the local logic function, and generating an output signal. The output signal may be applied to a controlled process, machine, etc. The value source selector is adapted to selectively ignore I/O and explicit messages from the network based on the binding and to selectively use an idle action and set the output value according to an idle value when the local logic function is disabled. In addition, the value source selector may selectively use a fault action and set the output value according to a fault value based on an override attribute. The value source selector may further selectively ignore idle messages according to the override attribute.